﻿using UnityEngine;
using QFramework;

namespace HareGame
{
    public partial class Util
    {
        public bool IsNetworkReachability()
        {
            switch (Application.internetReachability)
            {
                case NetworkReachability.ReachableViaLocalAreaNetwork:
                    LogKit.I("当前网络环境:WIFI");
                    return true;
                case NetworkReachability.ReachableViaCarrierDataNetwork:
                    LogKit.I("当前网络环境:移动数据");
                    return true;
                default:
                    LogKit.I("当前网络环境:无网络");
                    return false;
            }
        }
    }
}
